1. Field of Invention
Embodiments of the invention relate generally to digital data processing, and, more specifically, in certain embodiments, to providing variable-width data input to a fixed-width device.
2. Description of Related Art
In the field of computing, pattern-recognition tasks are increasingly challenging. Ever larger volumes of data are transmitted between computers, and the number of patterns that users wish to identify is increasing. For example, spam and/or malware are often detected by searching for patterns in a data stream, e.g., particular phrases or pieces of code. The number of patterns increases with the variety of spam and malware, as new patterns may be implemented to search for new variants. Searching a data stream for each of these patterns can form a computing bottleneck. Often, as the data stream is received, it is searched for each pattern, one at a time. The delay before the system is ready to search the next portion of the data stream increases with the number of patterns. Thus, pattern-recognition may slow the receipt of data.
The data stream that includes the pattern of interest may be provided to a “fixed-width” device for processing. That is, the device receives and processes units of data having a specific size, such as one byte. In this instance, the device may be referred to as a “byte-oriented” device that receives one byte, i.e., 8 bits, at a time. In some systems, the device may be coupled to a bus wider than 8 bits, such as a 16-bit bus, 32-bit bus, etc. Existing mechanisms allow individual bytes to be accessed in these 16-bit, 32-bit, or wider buses. However, accessing individual bytes, such as may be provided by the one byte data stream to the device, does not use the full capacity of the 16-bit, 32-bit, or other wider buses, thus slowing down performance. The “byte-oriented” device is only capable of receiving one byte at a time, regardless of the width of the bus. For example, data having four bytes would require four byte-wide cycles, one byte per each cycle, to transmit the bytes. Additionally, some devices may process large quantities of bytes and may also process each byte in a sequence. These characteristics may cause bus congestion and a slowdown of the device.